{% extends 'myadmin/base.html' %}
{% block main_body %}
<style>
  .table-box {
        overflow-x: auto;
        margin: 10px 0;
    }
  .dataTable {
        min-width: 1000px;
    }
  .dataTable th, 
  .dataTable td {
        padding: 8px 12px;
        text-align: center;
    }
</style>
<section class="content-header">
    <h1>待处理饮食计划详情</h1>
    <ol class="breadcrumb">
        <li><a href="{% url 'myadmin_index' %}"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">待审核饮食计划详情</li>
    </ol>
</section>
<section class="content">
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">待审核饮食计划列表</h3>
        </div>
        <div class="box-body">
            <div class="table-box">
                <table class="table table-bordered table-striped dataTable">
                    <thead>
                        <tr>
                            
                            <th>饮食计划名称</th>
                            <th>所属用户</th>
                            <th>创建时间</th>
                            <th>计划状态</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for plan in plans %}
                            <tr>
                                
                                <td>{{ plan.plan_name }}</td>
                                <td>{{ plan.user.username }}</td>
                                <td>{{ plan.created_at }}</td>
                                <td>
                                    {% if plan.is_active %}
                                        已激活
                                    {% else %}
                                        未激活
                                    {% endif %}
                                </td>
                            </tr>
                        {% empty %}
                            <tr><td colspan="5">暂无待处理饮食计划记录</td></tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</section>
{% endblock %}